import { TOKEN_KEY } from '@/enums/cacheEnums'
import {useUserStore} from '@/stores/user'
import { getItem,removeItem } from '@/utils/storage'
import { useTabsStore } from '@/stores/multipleTabs'

export function getToken() {
    return getItem(TOKEN_KEY)
}

export function clearAuthInfo() {
    const userStore = useUserStore()
    userStore.resetState() 
    const appStore = useTabsStore()
    appStore.initTagsViewList()
    removeItem(TOKEN_KEY)
}
